from rest_framework.response import Response
from rest_framework.views import APIView

from leisurely.serializer.event_details import EventdetailsSerializers
from six_it.models import Gathering


class EventdetailsAPIView(APIView):

    def get(self, request, id):

        gathering = Gathering.objects.get(id=id)

        serializers = EventdetailsSerializers(gathering)

        return Response(serializers.data)